{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting jieba\n",
      "  Downloading jieba-0.42.1.tar.gz (19.2 MB)\n",
      "     ---------------------------------------- 0.0/19.2 MB ? eta -:--:--\n",
      "     ---------------------------------------- 0.0/19.2 MB ? eta -:--:--\n",
      "     --------------------------------------- 0.0/19.2 MB 435.7 kB/s eta 0:00:45\n",
      "     --------------------------------------- 0.1/19.2 MB 751.6 kB/s eta 0:00:26\n",
      "     ---------------------------------------- 0.2/19.2 MB 1.1 MB/s eta 0:00:17\n",
      "      --------------------------------------- 0.4/19.2 MB 1.7 MB/s eta 0:00:12\n",
      "     - -------------------------------------- 0.7/19.2 MB 2.5 MB/s eta 0:00:08\n",
      "     -- ------------------------------------- 1.2/19.2 MB 3.8 MB/s eta 0:00:05\n",
      "     ---- ----------------------------------- 2.0/19.2 MB 5.7 MB/s eta 0:00:04\n",
      "     ------- -------------------------------- 3.6/19.2 MB 8.5 MB/s eta 0:00:02\n",
      "     --------- ------------------------------ 4.5/19.2 MB 10.0 MB/s eta 0:00:02\n",
      "     --------- ------------------------------ 4.5/19.2 MB 10.0 MB/s eta 0:00:02\n",
      "     ------------ --------------------------- 5.9/19.2 MB 10.7 MB/s eta 0:00:02\n",
      "     ---------------- ----------------------- 7.8/19.2 MB 13.4 MB/s eta 0:00:01\n",
      "     ---------------- ----------------------- 7.8/19.2 MB 13.4 MB/s eta 0:00:01\n",
      "     -------------------- ------------------ 10.3/19.2 MB 16.8 MB/s eta 0:00:01\n",
      "     ------------------------ -------------- 12.1/19.2 MB 26.2 MB/s eta 0:00:01\n",
      "     -------------------------- ------------ 13.2/19.2 MB 25.2 MB/s eta 0:00:01\n",
      "     ----------------------------- --------- 14.5/19.2 MB 25.2 MB/s eta 0:00:01\n",
      "     -------------------------------- ------ 15.9/19.2 MB 28.4 MB/s eta 0:00:01\n",
      "     --------------------------------- ----- 16.7/19.2 MB 27.3 MB/s eta 0:00:01\n",
      "     ------------------------------------ -- 17.8/19.2 MB 26.2 MB/s eta 0:00:01\n",
      "     --------------------------------------  19.1/19.2 MB 29.8 MB/s eta 0:00:01\n",
      "     --------------------------------------  19.2/19.2 MB 28.5 MB/s eta 0:00:01\n",
      "     --------------------------------------- 19.2/19.2 MB 24.3 MB/s eta 0:00:00\n",
      "  Preparing metadata (setup.py): started\n",
      "  Preparing metadata (setup.py): finished with status 'done'\n",
      "Building wheels for collected packages: jieba\n",
      "  Building wheel for jieba (setup.py): started\n",
      "  Building wheel for jieba (setup.py): finished with status 'done'\n",
      "  Created wheel for jieba: filename=jieba-0.42.1-py3-none-any.whl size=19314474 sha256=7857bbbb2ca32946a58858c02b19043ebcd4be8e6d7ce5c0cda49ac35ce7b565\n",
      "  Stored in directory: c:\\users\\tea-301\\appdata\\local\\pip\\cache\\wheels\\08\\a1\\a3\\5c8ac52cc2f5782ffffc34c95c57c8e5ecb3063dc69541ee7c\n",
      "Successfully built jieba\n",
      "Installing collected packages: jieba\n",
      "Successfully installed jieba-0.42.1\n"
     ]
    }
   ],
   "source": [
    "!pip install jieba"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Building prefix dict from the default dictionary ...\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Dumping model to file cache C:\\Users\\TEA-301\\AppData\\Local\\Temp\\jieba.cache\n",
      "Loading model cost 0.437 seconds.\n",
      "Prefix dict has been built successfully.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['计算机', '程序设计']\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "# 导入jieba\n",
    "import jieba\n",
    "\n",
    "# 分词\n",
    "ls = jieba.lcut(\"计算机程序设计\")\n",
    "print(ls)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
